<?php
// +----------------------------------------------------------------------
// | flow-notify / Notify.php    [ 2021/11/9 10:23 上午 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2011~2021 zhangqiquan All rights reserved.
// +----------------------------------------------------------------------
// | Author: zhangqiquan <768617998@qq.com>
// +----------------------------------------------------------------------
declare (strict_types=1);

namespace notify;

/**
 * @method static Sms sms(string $driverName, array $config)
 * @method static Email eamil()
 * @method static AppPush apppush()
 * @method static UniPush unipush(array $config)
 */

class Notify extends Container
{
    /**
     * 应用根目录
     * @var string
     */
    protected static $rootPath = '';

    /**
     * app注册,其他的也需要注册,service,lib都可以搞一套注册 使用的时候注册
     * 应用初始化器(从app容器调用的类全部是单例)
     * @var array
     */
    protected static $registers = [
        'sms'           => Sms::class,
        'unipush'       => UniPush::class,
        'email'         => Email::class
    ];

    /**
     * 获取项目跟目录地址
     * @return string
     */
    public static function rootPath(){
        if(!self::$rootPath) self::$rootPath = dirname(__DIR__);
        return self::$rootPath;
    }

}